/**
 * <copyright>
 * </copyright>
 *

 */
package org.openarchitectureware.recipe2.dsl.recipeBuilder.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

import org.openarchitectureware.recipe2.dsl.recipeBuilder.*;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class RecipeBuilderFactoryImpl extends EFactoryImpl implements RecipeBuilderFactory
{
  /**
   * Creates the default factory implementation.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public static RecipeBuilderFactory init()
  {
    try
    {
      RecipeBuilderFactory theRecipeBuilderFactory = (RecipeBuilderFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.openarchitectureware.org/recipe2/dsl/RecipeBuilder"); 
      if (theRecipeBuilderFactory != null)
      {
        return theRecipeBuilderFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new RecipeBuilderFactoryImpl();
  }

  /**
   * Creates an instance of the factory.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RecipeBuilderFactoryImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
      case RecipeBuilderPackage.RECIPE_BUILDER_MODEL: return createRecipeBuilderModel();
      case RecipeBuilderPackage.IMPORT: return createImport();
      case RecipeBuilderPackage.PLUGIN_IMPORT: return createPluginImport();
      case RecipeBuilderPackage.PREDEF_TEMPLATE_PACKAGE: return createPredefTemplatePackage();
      case RecipeBuilderPackage.TEMPLATE: return createTemplate();
      case RecipeBuilderPackage.PREDEF_TEMPLATE: return createPredefTemplate();
      case RecipeBuilderPackage.PLUGIN_TEMPLATE: return createPluginTemplate();
      default:
        throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
    }
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RecipeBuilderModel createRecipeBuilderModel()
  {
    RecipeBuilderModelImpl recipeBuilderModel = new RecipeBuilderModelImpl();
    return recipeBuilderModel;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Import createImport()
  {
    ImportImpl import_ = new ImportImpl();
    return import_;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public PluginImport createPluginImport()
  {
    PluginImportImpl pluginImport = new PluginImportImpl();
    return pluginImport;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public PredefTemplatePackage createPredefTemplatePackage()
  {
    PredefTemplatePackageImpl predefTemplatePackage = new PredefTemplatePackageImpl();
    return predefTemplatePackage;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Template createTemplate()
  {
    TemplateImpl template = new TemplateImpl();
    return template;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public PredefTemplate createPredefTemplate()
  {
    PredefTemplateImpl predefTemplate = new PredefTemplateImpl();
    return predefTemplate;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public PluginTemplate createPluginTemplate()
  {
    PluginTemplateImpl pluginTemplate = new PluginTemplateImpl();
    return pluginTemplate;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public RecipeBuilderPackage getRecipeBuilderPackage()
  {
    return (RecipeBuilderPackage)getEPackage();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @deprecated
   * @generated
   */
  @Deprecated
  public static RecipeBuilderPackage getPackage()
  {
    return RecipeBuilderPackage.eINSTANCE;
  }

} //RecipeBuilderFactoryImpl
